<%-- 
    Document   : reportBug
    Created on : 7.5.2009, 0:22:51
    Author     : Ediczech
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <%@include file="view/header.jsp" %>

    <%-- Content --%>

    <h2><h:outputText value="#{msg.reportBug_title}"/></h2>
    <a4j:form ajaxSubmit="true" reRender="reportBugPanel" id="reportBug" prependId="">
        <a4j:outputPanel ajaxRendered="true" id="reportBugPanel">
            <h:panelGrid>
                <h:panelGroup>
                    <h:outputText value="#{msg.bug_project}: " />
                    <h:selectOneMenu id="Project" value="#{ReportBugBean.projectId}">
                        <f:selectItems value="#{ReportBugBean.projects}" />
                    </h:selectOneMenu>
                </h:panelGroup>
                <h:message for="Project" errorClass="message_error"/>

                <h:outputText value="#{msg.bug_title}:" />
                <h:inputText id="Title" value="#{ReportBugBean.bug.title}"
                             size="50" required="true">
                    <f:validateLength minimum="10" maximum="100"/>
                </h:inputText>
                <h:message for="Title" errorClass="message_error"/>

                <h:outputText value="#{msg.bug_detail}:" />
                <h:inputTextarea id="Detail" value="#{ReportBugBean.bug.summary}"
                                 rows="10" cols="65" required="true" >
                    <f:validateLength minimum="20"/>
                </h:inputTextarea>
                <h:message for="Detail" errorClass="message_error"/>

                <h:messages errorClass="message_error" globalOnly="true"/>
                <h:commandButton action="#{ReportBugBean.report}" value="#{msg.reportBug_button}"/>
            </h:panelGrid>
        </a4j:outputPanel>
    </a4j:form>

    <%-- Content --%>

    <%@include file="view/footer.jsp" %>
</f:view>